package com.shark.teach;

import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

/**
 * @auther shark
 * @create 2024-07-27 10:59
 */
public class StackRecurrenceDemo
{
    private static AtomicLong atomicLong = new AtomicLong(0);

    public static void test(){
        System.out.println(atomicLong.getAndIncrement());
        test();
    }

    public static void main(String[] args) {
        StackRecurrenceDemo.test();



        // 新生代GC ： minor GC
        // 老年代GC：Full GC        垃圾回收-----》GC回收算法-----》GC垃圾收集器

    }
}

//Exception in thread "main" java.lang.StackOverflowError







/*
15462
Exception in thread "main" java.lang.StackOverflowError*/
